#ifndef DIALOG_H
#define DIALOG_H

#include "calendarShowWindow.h"
#include <QtGui/QDialog>
#include <QtGui/QToolButton>
namespace Ui {
    class Calendar;
}

class Calendar : public QDialog
{
    Q_OBJECT

public:
    explicit Calendar(QWidget *parent = 0);
    Calendar(QPoint position,QSize size);
    ~Calendar();

    void init(QPoint position,QSize size);
    void updateUI();

    qint32 getWidth()
    {return _size.width();}
    qint32 getHeight()
    {return _size.height();}
    QPoint getPosition()
    {return _pos;}
    QSize getSize()
    {return _size;}
    NoteItemMap * getItemMap();
    void reloadData(QString fileName="noteData.ldc");//reload data
    void backupData(QString fileName="noteData.ldc");//backup data

    void setWidth(qint32);
    void setHeight(qint32);
    void setPosition(QPoint);
    void setSize(QSize);

private:
    QSize   _size;
    QPoint  _pos;
    QHBoxLayout _wholeLayout;
public:
    CalendarShowWindow * _pCalendarWindow;
private:
    Ui::Calendar *ui;
};

#endif // DIALOG_H
